The invention relates generally to the field of digital computer systems, and more particularly to systems and methods for facilitating the invocation by a program being processed by a computer in one address space, of processing of methods and procedures in another address space, which may be implemented either on the same computer or on another computer. The invention particularly provides a system and method for obtaining and dynamically loading xe2x80x9cstubxe2x80x9d information which facilitates invocation by a program operating in one address space of a remote method or procedure in another address space, and possibly on another computer.
In modern xe2x80x9centerprisexe2x80x9d computing, a number of personal computers, workstations, and other devices such as mass storage subsystems, network printers and interfaces to the public telephony system, are typically interconnected in one or more computer networks. The personal computers and workstations are used by individual users to perform processing in connection with data and programs that may be stored in the network mass storage subsystems. In such an arrangement, the personal computers/workstations, operating as clients, typically download the data and programs from the network mass storage subsystems for processing. In addition, the personal computers or workstations will enable processed data to be uploaded to the network mass storage subsystems for storage, to a network printer for printing, to the telephony interface for transmission over the public telephony system, or the like. In such an arrangement, the network mass storage subsystems, network printers and telephony interface operate as servers, since they are available to service requests from all of the clients in the network. By organizing the network in such a manner, the servers are readily available for use by all of the personal computers/workstations in the network. Such a network may be spread over a fairly wide area, with the personal computers/workstations being interconnected by communication links such as electrical wires or optic fibers.
In addition to downloading information from servers for processing, a client, while processing a program, can remotely initiate processing by a server computer of particular routines and procedures (generally xe2x80x9cproceduresxe2x80x9d), in connection with certain xe2x80x9cparameterxe2x80x9d information provided by the client. After the server has processed the procedure, it will provide results of its processing to the client, which the client may thereafter use in its processing operations. Typically in such xe2x80x9cremote procedure callsxe2x80x9d the program will make use of a local xe2x80x9cstubxe2x80x9d which, when called, transfers the request to the server which implements the particular procedure, receives the results and provides them to the program. Conventionally, the stub must be compiled with the program, in which case the information needed to call the remote procedure must be determined at compile time, rather than at the time the program is run. Since the stub available to the client""s programs is static, it may be at best the closest that can be determined should be provided for the program when it (the program) is compiled. Accordingly, errors and inefficiencies can develop due to mismatches between the stub that is provided to a program and the requirements of the remote procedure that is called when the program is run.
The invention provides a new and improved system and method for facilitating the obtaining and dynamic loading of a stub provided to enable a program operating in one address space to remotely invoke processing of a method or procedure in another address space, so that the stub can be loaded by the program when it is run and needed, rather than being statically determined when the program is compiled. Indeed, the stub that is loaded can be obtained from the resource providing the remote method or procedure, and so it (the stub) can exactly define the invocation requirements of the remote method or procedure. Since the stub can be located and dynamically loaded while the program is being run, rather that being statically determined when the program is compiled, run-time errors and inefficiencies which may result from mis-matches between the stub that is provided and the requirements of the remote method or procedure that is invoked can be minimized.
In brief summary, the invention provides a stub retrieval and loading subsystem for use in connection with a remote method invocation system. The stub retrieval and loading subsystem controls the retrieval and loading of a stub for a remote method, into an execution environment, to facilitate invocation of the remote method by a program executing in the execution environment. The stub retrieval subsystem includes a stub retriever for initiating a retrieval of the stub and stub loader for, when the stub is received by the stub retriever, loading the stub into the execution environment, thereby to make the stub available for use in remote invocation of the remote method. In one embodiment, the stub retrieval and loading subsystem effects the retrieval and loading for a program operating in one address space provided by one computer, of stub class instances to effect the remote invocation of methods which are provided by objects operating in another address space, which may be provided by the same computer or a different computer. In that same embodiment, the stub retrieval and loading subsystem effects the retrieval and loading of a stub class instance when the remote object is referenced, although in other embodiments retrieval and loading may be effected when the remote method is invoked.